
def escalaF(fmin,fmax,n):
    return e**arange(log(fmin),log(fmax),(log(fmax-log(fmin))/n))

def anguloSimplesPolo(freq,polo):
    if freq<polo/10:
        return 0.0
    elif freq>polo*10:
        return -90.0
    else:
        return -90.0*(log(freq)-log(polo/10.))/(log(polo*10.)-log(polo/10.))
from scipy import *
        
def anguloPolo(freq,polo):
    Av = 1/(1+1j*freq/polo)
    return angle(Av,'deg')

def dbPolo(freq,polo):
    Av = 1/(1+1j*freq/polo)
    return 20*log10(abs(Av))

def dbSimplesPolo(freq,polo):
    if freq<polo:
        return 0
    else:
        return 20*log10(polo/freq)
